package com.gakj.truck.third.api.controller;

import com.alibaba.fastjson.JSONObject;
import com.gakj.truck.third.api.service.TruckDtoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * 蜗牛车辆相关操作
 * Created by gc on 2016/5/10.
 */
@RestController
@RequestMapping(value = "/api/truck")
public class TruckDtoController {


    @Autowired
    TruckDtoService truckDtoService;


    @RequestMapping(value = "/list",method = RequestMethod.GET)
    public JSONObject getAllTruck(
            @RequestParam(value = "day",defaultValue = "1") int day
    ){
        return truckDtoService.getAll(day);
    }
}
